{if isset($error_msg)}
{$error_msg}
{/if}
<script type="text/javascript" src="{$DESIGN_PATH}files/script.js"></script>
<form action="{$REQUEST_URI}" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
	<div id="tabs">
		<ul>
			<li><a href="#tabs-1">{lang values="common|publication_period"}</a></li>
			<li><a href="#tabs-2">{lang values="files|file_statements"}</a></li>
		</ul>
		<div id="tabs-1">
			<dl>
				<dt><label for="start">{lang values="common|start_date"}</label></dt>
				<dd>{$start_date}</dd>
				<dt><label for="end">{lang values="common|end_date"}</label></dt>
				<dd>{$end_date}</dd>
			</dl>
			<p>
				{lang values="common|date_description"}
			</p>
		</div>
		<div id="tabs-2" class="ui-tabs-hide">
			<dl>
				<dt><label for="link_title">{lang values="files|link_title"}</label></dt>
				<dd><input type="text" name="form[link_title]" id="link_title" value="{$form.link_title}" maxlength="120" /></dd>
				<dt><label>{lang values="files|filename"}</label></dt>
				<dd><input type="text" value="{$current_file}" class="readonly" disabled="disabled" /></dd>
				<dt><label for="file-internal">{lang values="files|new_file"}</label></dt>
				<dd>
					<label for="external">
						<input type="checkbox" name="form[external]" id="external" value="1" class="checkbox"{$checked_external} />
						{lang values="files|external_resource"}
					</label>
					<input type="file" name="file_internal" id="file-internal" />
					<input type="text" name="form[file_external]" id="file-external" value="" maxlength="120" />
				</dd>
			</dl>
			<dl id="external-filesize">
				<dt><label for="filesize">{lang values="files|filesize"}</label></dt>
				<dd>
					<input type="text" name="form[filesize]" id="filesize" value="{$form.filesize}" maxlength="15" style="width:49%;display:inline" />
					<select name="form[unit]" id="unit" style="width:49%;display:inline">
						<option value="">{lang values="common|pls_select"}</option>
{foreach from=$units item=row}
						<option value="{$row.value}"{$row.selected}>{$row.value}</option>
{/foreach}
					</select>
				</dd>
			</dl>
			<dl>
				<dt><label for="text">{lang values="common|description"}</label></dt>
				<dd>{wysiwyg name="text" value="`$form.text`" height="200" toolbar="simple"}</dd>
				<dt><label for="cat">{lang values="common|category"}</label></dt>
				<dd>
					{$categories}
				</dd>
{if isset($options)}
				<dt><label for="comments">{lang values="common|options"}</label></dt>
				<dd>
					<ul style="margin:0 20px;list-style:none">
{foreach from=$options item=row}
						<li>
							<label for="{$row.name}">
								<input type="checkbox" name="form[{$row.name}]" id="{$row.name}" value="1" class="checkbox"{$row.checked} />
								{$row.lang}
							</label>
						</li>
{/foreach}
					</ul>
				</dd>
{/if}
			</dl>
		</div>
	</div>
	<div class="form-bottom">
		<input type="submit" name="submit" value="{lang values="common|submit"}" class="form" />
	</div>
</form>